package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.AIndustry;
import com.smooth.dao.gen.bean.AIndustryExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface AIndustryMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @SelectProvider(type=AIndustrySqlProvider.class, method="countByExample")
    long countByExample(AIndustryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @DeleteProvider(type=AIndustrySqlProvider.class, method="deleteByExample")
    int deleteByExample(AIndustryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @Delete({
        "delete from a_industry",
        "where industry_id = #{industryId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer industryId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @Insert({
        "insert into a_industry (industry_id, industry_level, ",
        "industry_one, industry_two, ",
        "industry_three, industry_four, ",
        "industry_code, create_time, ",
        "update_time)",
        "values (#{industryId,jdbcType=INTEGER}, #{industryLevel,jdbcType=SMALLINT}, ",
        "#{industryOne,jdbcType=VARCHAR}, #{industryTwo,jdbcType=VARCHAR}, ",
        "#{industryThree,jdbcType=VARCHAR}, #{industryFour,jdbcType=VARCHAR}, ",
        "#{industryCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(AIndustry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @InsertProvider(type=AIndustrySqlProvider.class, method="insertSelective")
    int insertSelective(AIndustry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @SelectProvider(type=AIndustrySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="industry_id", property="industryId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="industry_level", property="industryLevel", jdbcType=JdbcType.SMALLINT),
        @Result(column="industry_one", property="industryOne", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_two", property="industryTwo", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_three", property="industryThree", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_four", property="industryFour", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_code", property="industryCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<AIndustry> selectByExample(AIndustryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @Select({
        "select",
        "industry_id, industry_level, industry_one, industry_two, industry_three, industry_four, ",
        "industry_code, create_time, update_time",
        "from a_industry",
        "where industry_id = #{industryId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="industry_id", property="industryId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="industry_level", property="industryLevel", jdbcType=JdbcType.SMALLINT),
        @Result(column="industry_one", property="industryOne", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_two", property="industryTwo", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_three", property="industryThree", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_four", property="industryFour", jdbcType=JdbcType.VARCHAR),
        @Result(column="industry_code", property="industryCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    AIndustry selectByPrimaryKey(Integer industryId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @UpdateProvider(type=AIndustrySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") AIndustry record, @Param("example") AIndustryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @UpdateProvider(type=AIndustrySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") AIndustry record, @Param("example") AIndustryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @UpdateProvider(type=AIndustrySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(AIndustry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_industry
     */
    @Update({
        "update a_industry",
        "set industry_level = #{industryLevel,jdbcType=SMALLINT},",
          "industry_one = #{industryOne,jdbcType=VARCHAR},",
          "industry_two = #{industryTwo,jdbcType=VARCHAR},",
          "industry_three = #{industryThree,jdbcType=VARCHAR},",
          "industry_four = #{industryFour,jdbcType=VARCHAR},",
          "industry_code = #{industryCode,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where industry_id = #{industryId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(AIndustry record);
}